package enums;

public class Enum2 {
	public static void main(String[] args) {
		System.out.println(EnumExample.D.getVal1());
		
		EnumExample.D.setVal1(21312);
		System.out.println(EnumExample.D.getVal1());
		
		test(EnumExample.D);
	}
	
	
	
	public enum EnumExample{
		A(3,3),
		B(4,5),
		C(5,5),
		D(2,3);
		
		private int val1;
		private int val2;
		private EnumExample(int val1, int val2){
			this.val1 = val1;
			this.val2 = val2;
		}
		
		public int getVal1(){
			return val1;
		}
		public int getVal2(){
			return val2;
		}
		
		public void setVal1(int val){
			this.val1 = val;
		}
		
		
	}
	
	public static void test(EnumExample e){
		System.out.println("--->" +e);
	}
}
